//
//  MYDynamicCommentCell.m
//  MuYing
//
//  Created by tbb on 2019/7/24.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "MYDynamicCommentCell.h"

@implementation MYDynamicCommentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.commentBtn setImage:YQIMG(@"common_home_Comment_icon") forState:(UIControlStateNormal)];
    self.commentBtn.titleLabel.font = kSystemMedium(13);
    [self.commentBtn setTitleColor:kAPPMainTitleColor forState:(UIControlStateNormal)];
    [self.commentBtn setTitle:@"1" forState:(UIControlStateNormal)];
    self.userIcon.layer.cornerRadius = 14;
    self.userIcon.clipsToBounds = true;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(YQPCommentModel *)model{
    _model = model;
    [self.userIcon sd_setImageWithURL:[NSURL URLWithString:model.headImg] placeholderImage:IMAGE_NAMED(@"")];
    
    self.labTitle.text = model.name;
    self.commentLb.text = model.content;
    self.timeLb.text = [YQPInsureValidate timeInStr:model.createTime formatter:@"yy/MM/dd HH:mm"];

    [self.commentBtn setTitle:model.replyNumber forState:UIControlStateNormal];
}
@end
